{% extends "common/layout_main.html" %}
{% block content %}
<div class="row  border-bottom">
    <div class="col-lg-12">
        <div class="tab_title">
            <ul class="nav nav-pills">
                <li class="current">
                    <a href="{{ buildUrl('/switch/') }}">交换机管理</a>
                </li>

            </ul>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <form class="form-inline wrap_search">
            <div class="row  m-t p-w-m">
                <div class="form-group">
                    <div class="input-group">
                        <input type="text" name="mix_kw" placeholder="请输入IP地址或MAC地址" class="form-control" value="{{ search_con['mix_kw'] }}">
                        <input type="hidden" name="p" value="{{  search_con['p'] }}">
                        <span class="input-group-btn">
                            <button type="button" class="btn  btn-primary search">
                                <i class="fa fa-search"></i>搜索
                            </button>
                        </span>
                    </div>
                </div>
            </div>
            <hr>
        </form>
        <table class="table table-bordered m-t">
            <thead>
            <tr>
                <th>IP地址</th>
                <th>MAC地址</th>
                <th>交换机IP</th>
                <th>交换机端口</th>
                <th>更新时间</th>
                <th>备注</th>
            </tr>
            </thead>
            <tbody>
            {% if info %}
            {%  for item in info  %}
            <tr>
                 <td>{{ item.ARP.ipaddr}}</td>
                <td>{{ item.MAC.macadd }}</td>
                <td>{{ item.MAC.swip }}</td>
                <td>{{ item.MAC.port }}</td>
                <td>{{ item.MAC.update_time }}</td>
                <td>{{ item.MAC.note }}</td>

            </tr>
            {% endfor %}
            {% else %}
            <tr>
                <td colspan="6">暂无数据</td>
            </tr>
            {% endif %}
            </tbody>
        </table>
        <!--分页代码已被封装到统一模板文件中-->
        {% include 'common/pagenation.html' %}
    </div>
</div>
{% endblock %}
{% block js %}
  <script src="{{ buildStaticUrl('/js/index/index.js') }}"></script>
{% endblock %}
